//
//  XFXReadDetailModel.m
//  XFXnews
//
//  Created by dllo on 16/1/28.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "XFXReadDetailModel.h"
#import "XFXReadDetailImageModel.h"
@implementation XFXReadDetailModel

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    
}

+(instancetype)detailWithDict:(NSDictionary *)dic{
    
    XFXReadDetailModel *model = [[XFXReadDetailModel alloc] init];
    model.title = dic[@"title"];
    model.ptime = dic[@"ptime"];
    model.body = dic[@"body"];
    NSArray *imageArray = dic[@"img"];
    NSMutableArray *array = [NSMutableArray arrayWithCapacity:imageArray.count];
    for (NSDictionary *dic in imageArray) {
        
        XFXReadDetailImageModel *imgModel= [XFXReadDetailImageModel detailImg:dic];
        
        [array addObject:imgModel];
    }
    model.img = array;
    
    return model;
}


@end
